https://discord.gg/botpress logo
Hostinger HTML webchat
# 🤝help
f
HI guys, I'm trying to host my webchat bot on Hostinger as a pure HTML file. Locally the file opens fine in Chrome, but once hosted the bot won't show. Hostinger is talking about a domain whitelist or CORS. Any thoughts? Also is there any chance of getting autoplay and loop media? Thx
Only option I find is this, but it's empty:
Going for team upgrade is ridicolous. Just trying to experiment a bit with Botpress atm. Allready spent 100$ for add-ons, paying another 500$ is way above my budget for this learning experiment
I switsched from Hostinger Pagebuilder to a hosted HTML page because I had big trouble to get the embedded Bot to show in full screen height. Width was working fine, but not height. As a local HTML file the bot looked perfect, but won't show hosted as mentioned
Any Idea what could be my Noob mistake? Last two examples were made with Pagebuilder and IFRame
Ofc I could go for fixed height, but I need responsive height
p
Hi, I'm unsure what the issue you're trying to fix at the moment is? Would you mind reiterating your current problem?
f
Hi Leanne, got a few problems while trying to put my learning bot online: - I'm trying to put my bot as an IFrame in webchat mode (not FAB/Floating Bubble) in full width and height on a Website. Bubble and 500x500px Webchat window is easy and working nicely. But getting the Webchat in responsive full height just won't work for me. Allways getting the width but only this strange small height - Also got troubles scaling images messages with CSS the right way. Would like to have them full width as the messenger. Any tips Thx for taking the time, really appreciate
Tried so much, but really fail to get an IFrame with responsive full height. This seems the only working code for me (Hostinger problems), is there an easy way for full height?
Copy code
<!-- In your <head> tag -->
<script src="https://cdn.botpress.cloud/webchat/v2.4/inject.js"></script>
<style>
  #webchat .bpWebchat {
    position: unset;
    width: 100%;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
  }

  #webchat .bpFab {
    display: none;
  }
</style>

<!-- Put this on your page BEFORE the script below -->
<div id="webchat" style="width: 100%; height: 500px;"></div>

<!-- In your <body> tag -->
<script>
  window.botpress.on("webchat:ready", () => {
    window.botpress.open();
  });
  window.botpress.init({
  "botId": "MY_BOT_ID",
  "configuration": {
    "botName": "NAI",
    "botAvatar": "https://files.bpcontent.cloud/2025/05/28/10/20250528104238-3O6AAUHJ.jpeg",
    "botDescription": "NAI",
    "fabImage": "https://files.bpcontent.cloud/2025/05/28/10/20250528104238-3O6AAUHJ.jpeg",
    "website": {},
    "email": {},
    "phone": {},
    "termsOfService": {},
    "privacyPolicy": {},
    "color": "#00a2c7",
    "variant": "soft",
    "themeMode": "dark",
    "fontFamily": "inter",
    "radius": 1.5
  },
  "clientId": "MY_CLIENT_ID",
  "selector": "#webchat"
});
</script>
p
I'm looking into your issue, but generally the css styling should allow you to customize the size.
Can you explain what you mean by hostinger problems tho, doesn't the platform take html files no matter what they contain? I'm not familiar with it...
f
Hi Leanne, tried the other suggested methods from the docs like embed as component and directly as HTML div, but had no luck with them. Only working method for me seems to be the IFrame, but there I'm struggleing to get a responsive full height. Guess this is all a little over my competence. Thx
p
Can you take a look at this thread and see if any of the discussed methods might work: https://discord.com/channels/1108396290624213082/1371854065818144778
5 Views